package util

import "sync/atomic"

type IdGenerator struct {
    id int32
}

var Generator = IdGenerator {
    id :0,
}

func (g *IdGenerator) ID() int32 {
    return atomic.AddInt32(&g.id, 1)
}